package org.knot.mockejb3.annotation;


/**
 * 对注释PostConstruct的处理
 * 
 * @author yuxiaowei
 *
 */
public class PostConstructAnnotationRuleImpl implements AnnotationRule, org.knot.mockejb3.annotation.lifeCycle.PostConstruct{

    public void invoke(RuleParams params) throws Exception {
        Object[] os =  new Object[]{};
        if (params.getMethod().getParameterTypes().length!=0)
        {
            os =  new Object[params.getMethod().getParameterTypes().length];
        }
        params.getMethod().invoke(params.getSessionBean().getBean(), os);
    }

}
